package vmmsClient;


import java.io.PrintWriter;
import java.net.Socket;
import java.sql.SQLException;

import static management.CommonManagement.welcomePage;



public class UserClient {

    public static void main(String[] args) throws SQLException {
        vmStart();
    }

    private static void vmStart() throws SQLException {
        welcomePage();
    }
    public static void sendLogToService(String log){
        try (Socket s = new Socket("localhost", 8888);
             PrintWriter pw = new PrintWriter(s.getOutputStream(), true)) {
            pw.println("LOG:" + log);
        } catch (Exception ignore) {
            System.out.println("【Service】日志服务器已关闭");
        }
    }
}

